package response

type Response struct {
	Status  int    `json:"status"`
	Message string `json:"message"`
	TraceId string `json:"trace_id"`
	Data    any    `json:"data,omitempty"`
}

func ResponseParamMiss() Response {
	return Response{
		Status:  ErrParamMiss.Code,
		Message: ErrParamMiss.Message.Error(),
		TraceId: "",
		Data:    nil,
	}
}

func ResponseNotFound() Response {
	return Response{
		Status:  ErrNotFound.Code,
		Message: ErrNotFound.Message.Error(),
		TraceId: "",
		Data:    nil,
	}
}

func ResponseSuccess() Response {
	return Response{
		Status:  Success.Code,
		Message: Success.Message.Error(),
		TraceId: "",
		Data:    nil,
	}
}
